<?php
/**
 * Default layout, used to render most parts of the application
 *
 * @category backoffice
 * @package backoffice_layouts
 * @copyright Company
 */

// configure the title
$this->headTitle()->setSeparator(' - ');
$this->headTitle('Company');

$bodyClass = Zend_Registry::get('controllerName') . Zend_Registry::get('actionName');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" /> 
        <meta http-equiv="content-style-type" content="text/css" /> 
        <meta http-equiv="content-script-type" content="text/javascript" /> 
        <?= $this->headTitle() . PHP_EOL;?>
        
        <?= $this->headLink() . PHP_EOL;?>
        <?= $this->jQuery() ?>
        <?= $this->headScript() . PHP_EOL;?>
        
        <!--[if lte IE 7.0]>
            <link rel="stylesheet" type="text/css" href="css/ie.css" media="screen, projection, tv" />
        <![endif]--> 
        
        <!--[if IE 8.0]>
            <style type="text/css">
                form.fields fieldset {margin-top: -10px;}
            </style>
        <![endif]--> 
        
        <!-- Adding support for transparent PNGs in IE6: --> 
        <!--[if lte IE 6]>
            <script type="text/javascript" src="<?= $this->baseUrl();?>/js/ddpng.js"></script>
            <script type="text/javascript">
                DD_belatedPNG.fix('.ico img');
                DD_belatedPNG.fix('.msg p');
                DD_belatedPNG.fix('table.calendar thead th.month a img');
                DD_belatedPNG.fix('table.calendar tbody img');
            </script>
        <![endif]--> 
        
    </head> 
    <body class="<?= $bodyClass ?>"> 
        <div id="header"> 
            <div class="inner-container clearfix"> 
                
                <h1 id="logo"> 
                    <a class="home" href="<?= $this->baseUrl();?>/backoffice" title="Go to admin's homepage"> 
                        Company backoffice
                    </a> 
                </h1> 
                
                <?php if(Zend_Auth::getInstance()->hasIdentity()) {?>
                    <div id="userbox"> 
                        <div class="inner"> 
                            <strong>
                                <a href="<?= $this->baseUrl();?>/backoffice/profile/edit/">
                                    <a class="user" href="<?= $this->baseUrl();?>/backoffice/profile"><?= $this->user->getEmail() ?>
                                </a>
                            </strong>
                            <ul class="clearfix"> 
                                <li><a href="<?= $this->baseUrl();?>/backoffice/profile/change-password/">Change password</a></li> 
                            </ul> 
                        </div> 
                        <a id="logout" href="<?= $this->baseUrl();?>/backoffice/users/logout">log out</a> 
                    </div><!-- #userbox --> 
                <?php } ?>
                
            </div><!-- .inner-container --> 
        </div><!-- #header --> 
                
        <div id="container"> 
            <?= $this->renderMenu();?>
            <div class="outer-container"> 
                <div class="inner-container"> 
                    <!-- flash messenger - displays success / fail messages to the user -->
                    <?php // echo $this->flashMessenger();?>
                    <div id="messages">
                    <?php echo $this->messenger(); ?>
                    </div>
                    <!-- end of flashMessenger -->
                    <!-- main content - the content of the view will be rendered here -->
                    <?= $this->layout()->content;?>
                    <!-- end of main content -->
                </div> 
                <div id="footer"><!-- footer, maybe you don't need it --> 
                    <p>Copyright © 2011 Code-Complex, All rights reserved.</p> 
                </div> 
            </div><!-- .inner-container --> 
            </div> 
        </div><!-- #container --> 
    </body> 
</html>